package com.wujing.scala.first4Day

/**
 * 算术运算
 *
 * 算术
 * 赋值
 *
 */
object operationDemo01 {

  def main(args: Array[String]): Unit = {
    //  ++  -- 在scala 中没有  改用 += -=
    var num = 10
    num += 1
    num -= 1

    println(num)



    println(10 % 3)
    println(-10 % 3)
    println(-10 % -3)
    println(10 % -3)


    val a1: Int = 10
    val a2: Double = a1 / 3
    val a4: Int = a1 / 3
    val a3 = a1 % 3
    println(a1 + "====" + a2 + "====" + a3 + "====" + a4)

  }

}
